package com.redis.queue.sub;

import redis.clients.jedis.Jedis;

public class Sub1Thread extends Thread {
	
    private final Jedis jedis;
    
	private final Sub1 sub = new Sub1();
	
    private final String channel = "test1";

	public Sub1Thread(Jedis jedis) {
		this.jedis = jedis;
	}
	
	@Override
	public void run() {
		try {
			this.jedis.subscribe(sub, channel);
        } catch (Exception e) {
            e.printStackTrace();
        } 
	}
}
